import service from '@/alova'

const sortApi = {
  getTreeList: () => {
    return service.Get('/api/v1/Sort/TreeList').send(true)
  },
  getDetail: (id: number) => {
    return service.Get(`/api/v1/Sort/${id}`)
  },
  add: (data: any) => {
    return service.Post('/api/v1/Sort', data)
  },
  update: (id: number, data: any) => {
    return service.Patch(`/api/v1/Sort/${id}`, data)
  }
}

export default sortApi
